<div class="rightcontent rc-bg-grey">
    <div class="rc-pagepadding">
        <div class=" rc-pannel ">
            <div class=" rc-pannel-header">
                <div class="rc-flex layui-form toolbar rc-flex-justify-between">
                    <div class=" rc-flex rc-flex-vertical-center ">
                    </div>
                    <div>
                        <a href="/admin/cnf/Pay/addChannel" class="layui-btn layui-btn-primary layui-btn-sm"><i class="iconfont">&#xe60e;</i> 添加通道</a>
                    </div>
                </div>
            </div>

            <div class="rc-pannel-body layui-form rc-pagepadding ">
                <table class="layui-table">
                    <colgroup>
                        <col>
                        <col>
                        <col style="width: 240px;">

                    </colgroup>
                    <thead>
                        <tr>
                            <th>通道名</th>
                            <th>使用扩展</th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                        
                    </tbody>
                </table>
            </div>

            <div class="rc-pannel-footer  ">
                <div class="pagebar" style="text-align: right;">
                    <?php  // echo paginator($channels->total(), 20) ?>
                </div>

            </div>
        </div>
    </div>
</div>

<script>
    layui.use(function() {
        var layer = layui.layer;

        $('.delete').click(function() {
            var channelid = $(this).attr('channelid');
            layer.confirm('确定要删除么？', {
                icon: 3
            }, function() {
                $.ajax({
                    url: '/admin/cnf/Message/delchannel?id=' + channelid, //请求路径
                    type: "POST", //请求方式
                    success: function(data) {
                        if (data.code == 0) {
                            window.location.reload();
                        } else {
                            toastr_error(data.message);
                        }
                        layer.closeAll();
                    },
                    error: function() {
                        layer.closeAll();
                    },

                });


            }, function() {



            });

        });

    });
</script>